//
//  ROHUD.swift
//  NeuFood
//
//  Created by yangjingxin on 2017/10/12.
//  Copyright © 2017年 yangjingxin. All rights reserved.
//

import Foundation

extension MBProgressHUD{
    
    class func showDelayHUDToView(_ view: UIView,message: String)->
        Void{
            let HUD = MBProgressHUD(view: view)
            view.addSubview(HUD!)
            HUD?.yOffset = Float(view.frame.size.height * 1.0 / 4.0)
            //不现实转圈，只显示一句提示的话
            HUD?.customView = UIImageView(frame:CGRect.zero)
            HUD?.mode = MBProgressHUDMode.customView
            HUD?.labelText = message
            HUD?.show(true)
            HUD?.hide(true, afterDelay:1)
    }
}
